﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

public class WarScene
{
    public void breath(float deltTime)
    {
        // scene objects breath
        WarSceneObject[] objects = mObjects.Values.ToArray();
        foreach (WarSceneObject sObject in objects)
        {
            sObject.breath(deltTime);

            if (sObject.needDestroy())
            {
                mObjects.Remove(sObject.ID);
            }
        }
    }

    /// <summary>
    /// 地图格子数据
    /// </summary>
    WarSceneBlock[,] mMapBlock = new WarSceneBlock[CommonDef.WARMAPCOW, CommonDef.WARMAPROW];
    /// <summary>
    /// 场景物信息
    /// </summary>
    Dictionary<int, WarSceneObject> mObjects = new Dictionary<int,WarSceneObject>();
    
    #region 元素委托

    void OnSceneObjectPositionChanged()
    {
        // region 切换
    }

    #endregion
}
